home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Usuario
- BackColor = &H0000FFFF&
- ClientHeight = 3990
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 7365
- ControlBox = 0 'False
- Height = 4395
- Left = 1035
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 266
- ScaleMode = 3 'Pixel
- ScaleWidth = 491
- Top = 1170
- Width = 7485
- WindowState = 2 'Maximized
- Begin SSCommand Cancelar
- Caption = "X"
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 615
- Left = 7110
- TabIndex = 11
- Top = 6270
- Visible = 0 'False
- Width = 1065
- End
- Begin SSCommand OK
- Caption = "OK"
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 615
- Left = 8220
- TabIndex = 10
- Top = 6270
- Visible = 0 'False
- Width = 1065
- End
- Begin TextBox Nome
- Height = 315
- Left = 7080
- TabIndex = 0
- Top = 2730
- Visible = 0 'False
- Width = 2175
- End
- Begin PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- FillStyle = 0 'Solid
- Height = 1305
- Left = 150
- ScaleHeight = 87
- ScaleMode = 3 'Pixel
- ScaleWidth = 107
- TabIndex = 9
- Top = 120
- Visible = 0 'False
- Width = 1605
- End
- Begin Timer Timer1
- Enabled = 0 'False
- Interval = 100
- Left = 300
- Top = 2340
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 7
- Left = 7080
- TabIndex = 8
- Top = 5220
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 6
- Left = 7080
- TabIndex = 7
- Top = 4920
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 5
- Left = 7080
- TabIndex = 6
- Top = 4620
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 4
- Left = 7080
- TabIndex = 5
- Top = 4320
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 3
- Left = 7080
- TabIndex = 4
- Top = 4020
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 2
- Left = 7080
- TabIndex = 3
- Top = 3720
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 1
- Left = 7080
- TabIndex = 2
- Top = 3420
- Visible = 0 'False
- Width = 2175
- End
- Begin Label Label_Nome
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Height = 315
- Index = 0
- Left = 7080
- TabIndex = 1
- Top = 3120
- Visible = 0 'False
- Width = 2175
- End
- Begin FXImage FXImage1
- Prop25 = 0 'Click on "..." for About Box
- AutoSize = 1 'Resize Control To Image
- BInnerColor1 = &H00808080&
- BInnerColor2 = &H00FFFFFF&
- BInnerStyle = 0 'None
- BInnerWidth = 1
- BorderColor = &H00C0C0C0&
- BorderWidth = 0
- BOuterColor1 = &H00808080&
- BOuterColor2 = &H00FFFFFF&
- BOuterStyle = 0 'None
- BOuterWidth = 1
- CancelLoad = 0 'False
- CancelMode = 0 'None
- CancelRemove = 0 'False
- Capture = 0 'None
- CropX = 0
- CropY = 0
- DecompressMode = 1 'Speed more important
- DEffect1 = 0 'No Effect
- DEffect2 = 0 'No Effect
- DEffect3 = 0 'No Effect
- DMode = 0 'None
- FileName = ""
- FXEnabled = -1 'True
- GIFPassword = ""
- Height = 7200
- HFileName = ""
- Left = 0
- MDelay = 30
- MEffect = 1 'Left To Right
- MGrain = 10
- Multitask = 0 'False
- Notify = -1 'True
- NotifyDelay = 0
- Palette = 0 'Optimized
- Pointer = 0 'Default
- PointerMode = 0 'Inside a Hotspot
- ShowDithered = 1 'Floyd-Steinberg
- ShowFlipped = 0 'False
- ShowHourglass = 0 'False
- ShowReverse = 0 'False
- ShowRotated = 0 'None
- TBackColor = &H00000000&
- TDelay = 0
- TEffect = 0 'No Effect
- TEnabled = 0 'False
- TForeColor = &H00000000&
- TGColor1 = &H00FF0000&
- TGColor2 = &H00000000&
- TGrain = 5
- TGSteps = 16
- TGStyle = 0 'Left To Right
- TOnly = 0 'False
- Top = 0
- Transparent = 0 'False
- TransparentColor= &H00000000&
- TransparentMode = 0 'Update
- TStyle = 0 'Solid
- UpdateImage = -1 'True
- Wand = 0 'False
- WandColor = &H00FFFFFF&
- WandWidth = 1
- Width = 9600
- End
- Dim timer_Contador As Integer
- Dim Pr
- xima_Cor As Long
- Sub Cancelar_Click ()
- If Len(Nome) > 0 Then
- a = MsgBox("Deseja apagar o " & Nome & " do programa?", 1, "aten
- If a = 1 Then
- For i = 0 To 7
- If Label_Nome(i).ForeColor = 255 Then
- Nome = ""
- Label_Nome(i).Caption = ""
- Label_Nome(i).ForeColor = &H0
- deletado = i
- Exit For
- End If
- Next
- For i = deletado + 1 To 7
- If Len(Label_Nome(i).Caption) > 0 Then
- Label_Nome(i - 1).Caption = Label_Nome(i).Caption
- Label_Nome(i).Caption = ""
- Else
- Exit For
- End If
- Next
- Contador_Usuario = Contador_Usuario - 1
- Grava_Usuario
- End If
- End If
- End Sub
- Sub Form_Load ()
- 'carrega a imagem de entrada
- FXImage1 = LoadPicture(DIR_TELAS & "entrada1.bmp")
- 'carrega os nomes dos Usuarios
- On Error GoTo Erro_Usuario
- NUsuario = FreeFile
- Open DIR_LOCAL & "Usuario.txt" For Input As #NUsuario
- Do While Not EOF(NUsuario)
- Line Input #NUsuario, Nome_Var
- Label_Nome(Contador_Usuario).Caption = Left(Nome_Var, Len(Nome_Var) - 4)
- 'MsgBox Label_Nome(Contador_Usuario).Caption
- Num_Usuario(Contador_Usuario) = Val(Right(Nome_Var, 4))
- 'MsgBox Str(Num_Usuario(Contador_Usuario))
- Contador_Usuario = Contador_Usuario + 1
- Close #NUsuario
- Carrega_Nome_Desenho
- Erro_Usuario:
- Carrega_Nome_Desenho
- Exit Sub
- End Sub
- Sub FXImage1_Notify ()
- Nome.Visible = True
- DoEvents
- For i = 0 To 7
- Label_Nome(i).Visible = True
- Cancelar.Visible = True
- OK.Visible = True
- FXImage1.MEffect = 0
- Timer1.Enabled = True
- End Sub
- Sub Grava_Usuario ()
- NOut = FreeFile
- Open DIR_LOCAL & "usuario.txt" For Output As #NOut
- For i = 0 To 7
- If Len(Label_Nome(i).Caption) > 0 Then
- Print #NOut, UCase(Label_Nome(i).Caption) & Mid(Rnd, 2, 4)
- Else
- Exit For
- End If
- Close #NOut
- End Sub
- Sub Label_Nome_Click (index As Integer)
- Contador_Usuario = index
- Limpa_Forecolor
- Label_Nome(index).ForeColor = 255
- Nome = Label_Nome(index).Caption
- Cancelar.Enabled = True
- OK.Enabled = True
- Nome.SetFocus
- SendKeys "+{end}"
- End Sub
- Sub Limpa_Forecolor ()
- For i = 0 To 7
- Label_Nome(i).ForeColor = &H0
- End Sub
- Sub Nome_KeyPress (KeyAscii As Integer)
- Limpa_Forecolor
- Cancelar.Enabled = False
- OK.Enabled = False
- If KeyAscii = 13 Then
- If Len(Nome) > 0 Then
- Cancelar.Enabled = True
- OK.Enabled = True
- 'verifica se j
- existe
- For i = 0 To 7
- If UCase(Nome) = UCase(Label_Nome(i)) Then
- Label_Nome(i).ForeColor = 255
- Nome = UCase(Nome)
- Exit Sub
- End If
- Next
- '... se n
- o existe verifica o n
- mero m
- ximo de Usuarios
- If Contador_Usuario + 1 > 8 Then
- MsgBox "Este programa s
- permite registrar o nome de 8 Usuarios."
- Exit Sub
- End If
- '... se for menor que 8 ...
- Label_Nome(Contador_Usuario).Caption = UCase(Nome)
- Label_Nome(Contador_Usuario).ForeColor = 255
- Nome = UCase(Nome)
- Contador_Usuario = Contador_Usuario + 1
- Else
- MsgBox "Escreva o seu nome."
- End If
- 'grava no disco
- Grava_Usuario
- End If
- Nome.SetFocus
- SendKeys "+{end}"
- End Sub
- Sub OK_Click ()
- Timer1.Enabled = False
- Dicion
- rio.Enabled = True
- 'MsgBox DIR_TELAS & Nome_Desenho(Array_Ativo)
- Dicion
- rio.FXImage1.Picture = LoadPicture(DIR_TELAS & Nome_Desenho(Array_Ativo))
- Dicion
- rio.Show
- End Sub
- Sub Timer1_Timer ()
- If timer_Contador = 0 Then
- Picture1 = LoadPicture(DIR_TELAS & "moving.bmp")
- Picture1.Visible = True
- timer_Contador = 1
- Timer1.Interval = 200
- ElseIf timer_Contador = 1 Then
- Picture1.FillColor = Pr
- xima_Cor
- a = floodfill(Picture1.hDC, 15, 47, &H0)
- timer_Contador = 2
- ElseIf timer_Contador = 2 Then
- Picture1.FillColor = Pr
- xima_Cor
- a = floodfill(Picture1.hDC, 39, 47, &H0)
- timer_Contador = 3
- ElseIf timer_Contador = 3 Then
- Picture1.FillColor = Pr
- xima_Cor
- a = floodfill(Picture1.hDC, 66, 47, &H0)
- timer_Contador = 1
- End If
- xima_Cor = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
- If Pr
- xima_Cor = 0 Then Pr
- xima_Cor = 1000
- End Sub
-